@extends('admin.layout.layout', ['row' => @$page])

@section('contain')


    <div class="portlet">
        <div class="portlet-title">
            <div class="caption">
                <x-portlet-breadcrumb :page="$page"></x-portlet-breadcrumb>
            </div>
            <div class="actions">
                {{--<div class="item">
                    <a href="/{{ request()->path() }}/create" class="btn btn-sm btn-primary">{{ ts('addnew') }}</a>
                </div>--}}
            </div>
        </div>

        <div>
            <div class="row">
                <div class="col-12">
                    {{ ts('warrantyid') }}：{{ $data->id }}
                </div>
            </div>
            <h3 class="section_sub_title">{{ ts('CUSTOMER') }}</h3>
            <div class="row my-3">
                <div class="col-12">
                    {{ ts('CUSTOMERNAME') }}：{{ $data->first_name }}
                </div>
            </div>
            <div class="row my-3">
                <div class="col-12">
                    {{ ts('addresss') }}：{{ $data->address }}
                </div>
            </div>
            <div class="row my-3">
                <div class="col-12">
                    {{ ts('region') }}：{{ ts('region_master.'.$data->region_id) }}
                </div>
            </div>
            <div class="row my-3">
                <div class="col-12">
                    {{ ts('province') }}：{{ ts('province_master.'.$data->province_id) }}
                </div>
            </div>
            <div class="row my-3">
                <div class="col-12">
                    {{ ts('city') }}：{{ ts('cities.'.$data->city) }}
                </div>
            </div>
            <div class="row my-3">
                <div class="col-12">
                    {{ ts('zip') }}：{{ $data->zip }}
                </div>
            </div>
            <div class="row my-3">
                <div class="col-12">
                    {{ ts('phonenumber') }}：{{ $data->phone_number }}
                </div>
            </div>
            <div class="row my-3">
                <div class="col-12">
                    {{ ts('email') }}：{{ $data->email_address }}
                </div>
            </div>
            <h3 class="section_sub_title">{{ ts('VEHICLEINFORMATION') }}</h3>

            <div class="row my-3">
                <div class="col-6">
                    {{ ts('year') }}：{{ $data->year_id }}
                </div>
                <div class="col-6">
                    {{ ts('make') }}：{{ ts('make_master.'.$data->make_id) }}
                </div>
            </div>
            <div class="row my-3">
                <div class="col-6">
                    {{ ts('model') }}：{{ $data->model_id }}
                </div>
                <div class="col-6">
                    {{ ts('licenseplate') }}：{{ $data->license_plate }}
                </div>
            </div>
            <div class="row my-3">
                <div class="col-6">
                    {{ ts('vinnumber') }}：{{ $data->vin_number }}
                </div>
            </div>
            <h3 class="section_sub_title">{{ ts('INSTALLATIONINFORMATION') }}</h3>
            <div class="row my-3">
                <div class="col-6">
                    {{ ts('INSTALLERNAME') }}：{{ $data->installer_name }}
                </div>
                <div class="col-6">
                    {{ ts('INSTALLATIONDATE') }}：{{ $data->installation_date }}
                </div>
            </div>
            <div class="row my-3">
                <div class="col-6">
                    {{ ts('INSTALLERPRICE') }}：{{ $data->installation_price }}
                </div>
            </div>
            <h3 class="section_sub_title">{{ ts('INSTALLATIONPICTURE') }}</h3>
            <table class="table table-s2 text-center">
                <tbody>
                <tr>
                    <td><img src="{{ stripos($data->image_front, '/') === 0 ? $data->image_front : 'http://xpel.dengwho.com/pictures/'.$data->image_front }}" alt="{{ ts('FRONT') }}" class="img-fluid"></td>
                    <td><img src="{{ stripos($data->image_back, '/') === 0 ? $data->image_back : 'http://xpel.dengwho.com/pictures/'.$data->image_back }}" alt="{{ ts('BACK') }}" class="img-fluid"></td>
                    <td><img src="{{ stripos($data->image_driver_side, '/') === 0 ? $data->image_driver_side : 'http://xpel.dengwho.com/pictures/'.$data->image_driver_side }}" alt="{{ ts('DRIVERSIDE') }}" class="img-fluid"></td>
                    <td><img src="{{ stripos($data->image_passenger_side, '/') === 0 ? $data->image_passenger_side : 'http://xpel.dengwho.com/pictures/'.$data->image_passenger_side }}" alt="{{ ts('PASSENGERSIDE') }}" class="img-fluid"></td>
                </tr>
                </tbody>
                <tfoot>
                <tr>
                    <th>{{ ts('FRONT') }}</th>
                    <th>{{ ts('BACK') }}</th>
                    <th>{{ ts('DRIVERSIDE') }}</th>
                    <th>{{ ts('PASSENGERSIDE') }}</th>
                </tr>
                </tfoot>
            </table>
            <h3 class="section_sub_title">{{ ts('VEHICLECOVERAGE') }}</h3>
            <table class="table table-s2 text-center">
                <thead>
                <tr>
                    <th>{{ ts('PART') }}</th>
                    <th>{{ ts('ROLLNUMBER') }}</th>
                    <th>{{ ts('LENGTH') }}</th>
                    <th>{{ ts('FILMTYPE') }}</th>
                    <th>{{ ts('FILMWIDTH') }}</th>
                </tr>
                </thead>
                <tbody>
                @foreach($data->warranty_to_vehicle_coverage as $v)
                    <tr>
                        <td>{{ ts('part_master.'.$v->part_id) }}</td>
                        <td>{{ $v->roll_number }}</td>
                        <td>{{ $v->length }}</td>
                        <td>{{ ts('film_type_master.'.$v->film_type_id) }}</td>
                        <td>{{ $v->width }}</td>
                    </tr>
                @endforeach
                </tbody>
            </table>

            <h3 class="section_sub_title">{{ ts('ADDITIONALCOMMENT') }}</h3>
            <div class="p-3 border">{{ $data->additional_comments }}</div>
        </div>

    </div>


@endsection